init_config:
  collect_default_metrics: true
  is_jmx: true
instances:
- conf:
  - include:
      attribute:
        version:
          alias: kafka.streams.version
      bean_regex: 'kafka\.streams:type=stream-metrics,client-id=.*'
  - include:
      attribute:
        commit-latency-avg:
          alias: kafka.streams.thread.commit-latency-avg
        commit-latency-max:
          alias: kafka.streams.thread.commit-latency-max
        commit-rate:
          alias: kafka.streams.thread.commit-rate
        commit-total:
          alias: kafka.streams.thread.commit-total
        poll-latency-avg:
          alias: kafka.streams.thread.poll-latency-avg
        poll-latency-max:
          alias: kafka.streams.thread.poll-latency-max
        poll-rate:
          alias: kafka.streams.thread.poll-rate
        poll-total:
          alias: kafka.streams.thread.poll-total
        process-latency-avg:
          alias: kafka.streams.thread.process-latency-avg
        process-latency-max:
          alias: kafka.streams.thread.process-latency-max
        process-rate:
          alias: kafka.streams.thread.process-rate
        process-total:
          alias: kafka.streams.thread.process-total
        punctuate-latency-avg:
          alias: kafka.streams.thread.punctuate-latency-avg
        punctuate-latency-max:
          alias: kafka.streams.thread.punctuate-latency-max
        punctuate-rate:
          alias: kafka.streams.thread.punctuate-rate
        punctuate-total:
          alias: kafka.streams.thread.punctuate-total
        task-closed-rate:
          alias: kafka.streams.thread.task-closed-rate
        task-closed-total:
          alias: kafka.streams.thread.task-closed-total
        task-created-rate:
          alias: kafka.streams.thread.task-created-rate
        task-created-total:
          alias: kafka.streams.thread.task-created-total
      tags:
          thread-id: $1
      bean_regex: 'kafka\.streams:type=stream-thread-metrics,thread-id=(.*?)(?:,|$)'
  - include:
      attribute:
        commit-latency-avg:
          alias: kafka.streams.task.commit-latency-avg
        commit-latency-max:
          alias: kafka.streams.task.commit-latency-max
        commit-rate:
          alias: kafka.streams.task.commit-rate
        commit-total:
          alias: kafka.streams.task.commit-total
        dropped-records-rate:
          alias: kafka.streams.task.dropped-records-rate
        dropped-records-total:
          alias: kafka.streams.task.dropped-records-total
        enforced-processing-rate:
          alias: kafka.streams.task.enforced-processing-rate
        enforced-processing-total:
          alias: kafka.streams.task.enforced-processing-total
        process-latency-avg:
          alias: kafka.streams.task.process-latency-avg
        process-latency-max:
          alias: kafka.streams.task.process-latency-max
        process-rate:
          alias: kafka.streams.task.process-rate
        process-total:
          alias: kafka.streams.task.process-total
        record-lateness-avg:
          alias: kafka.streams.task.record-lateness-avg
        record-lateness-max:
          alias: kafka.streams.task.record-lateness-max
      tags:
          thread-id: $1
          task: $2
      bean_regex: 'kafka\.streams:type=stream-task-metrics,thread-id=(.*?),task-id=(.*?)(?:,|$)'
  - include:
        attribute:
          process-rate:
            alias: kafka.streams.processor.process-rate
          process-total:
            alias: kafka.streams.processor.process-total
          suppression-emit-rate:
            alias: kafka.streams.processor.suppression-emit-rate
          suppression-emit-total:
            alias: kafka.streams.processor.suppression-emit-total
        tags:
            thread-id: $1
            task: $2
            processor-node-id: $3
        bean_regex: 'kafka\.streams:type=stream-processor-node-metrics,thread-id=(.*?),task-id=(.*?),processor-node-id=(.*?)(?:,|$)'
  host: localhost
  port: 11004
  jvm_direct: true
  java_bin_path: {{ java_bin_path }}
  java_options: -Xmx50m -Xms15m
  refresh_beans: 120
